#ifndef _H_GAME
#define _H_GAME

#include <string>
#include <iostream>

class basePlayer;
class baseBoard;
class baseDeck;

class Game
{
    private:
        int tokenNumber;
        static const int maxPlayers = 4;
        std::vector<basePlayer*> players;
        baseBoard* board;
        baseDeck* deck;
        baseDeck* trash;
        int activePlayerIndex;

    public:
        // Constructor
        Game(baseBoard* aBoard, baseDeck* aDeck, baseDeck* aTrash, int aTokenNumber = 10);

        // Destructor
        ~Game();
        
        // Accessor
        std::vector<basePlayer*> getPlayers();
        baseBoard* getBoard();
        baseDeck* getDeck();
        baseDeck* getTrash();
        int getTokenNumber();
        void setTokenNumber(int aTokenNum);
        int getMaxPlayers();

        // Print
        std::string toString();
        void toString(std::ostream &out);
        void toString(std::string &str);

        void display();
        basePlayer* getActivePlayer();

        void addPlayer(basePlayer& aPlayer);
        int countPlayers();

        void checkForWonCards();

    private:
        std::string playerListToString();
};

#endif //_H_GAME